import request from '@/utils/request'

// 销售产品分组列表查询
export function listGroup(params) {
  return request({
    url: '/system/productsGroup/list',
    method: 'get',
    params,
  })
}

// 根据id查询销售产品分组详细
export function getGroup(id) {
  return request({
    url: `/system/productsGroup/${ id }`,
    method: 'get',
  })
}

// 新增销售产品分组
export function addGroup(data) {
  return request({
    url: '/system/productsGroup',
    method: 'post',
    data,
  })
}

// 修改销售产品分组
export function updateGroup(data) {
  return request({
    url: '/system/productsGroup',
    method: 'put',
    data,
  })
}
// 删除销售产品分组
export function delGroup(ids) {
  return request({
    url: `/system/productsGroup/${ ids }`,
    method: 'delete',
  })
}